package com.qf.fanwang.controller;

import com.qf.fanwang.pojo.Computer;
import com.qf.fanwang.pojo.GoodsDetails;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class GoodsController extends  BaseController {

    protected String selectOne(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String ids=req.getParameter("id");
        if(ids!=null) {
            int id=Integer.valueOf(ids);
            /*if(id==44) {
                Computer goods=goodsService.selectOneComputer(id);
                req.setAttribute("in","computer");
                req.setAttribute("goods", goods);
            }else {
                GoodsDetails goods=goodsService.selectOneGoods(id);
                //Goods goods=goodsService.selectOne(id);
                *//* goods.setPub(Tools.format(goods.getPubdate())); *//*
                req.setAttribute("goods", goods);
            }*/
        }
        return "forward:goods";
    }
}
